<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title>库存盘点单据列表 - WMS仓库管理系统</title>
</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">

<div class="layui-body" style="padding:15px;top: 0px;">

    <!-- start sp-wrapper -->
    <link rel="stylesheet" href="/sb/stock.css"/>
    <div class="sp-wrapper">
        <h2 class="sp-title"><span >库存盘点单据列表</span></h2>
        <div class="sp-tool">
            <span class="fl">
                <form action="/stocktaking/list" method="get">
                <b><input type="text" name="billNo" th:value="${billNo}" placeholder="输入单据编号查询" style="width:200px;"></b>
                <b><input type="submit" class="button" value="查询"></b>
                    <b>总共：&nbsp;[[${totalSize}]]&nbsp;条记录</b>
                </form>

            </span>

            <span class="fr">
                <a href="/stocktaking/add" class="add">新增盘点单</a>
                <!--                <i>导出</i>-->
            </span>
        </div>
        <div class="sp-table">

            <table>
                <thead>
                <tr>
                    <th>ID</th>
                    <th>单据日期</th>
                    <th>单据编号</th>
                    <th>仓库</th>
                    <th>盘点仓位数</th>
                    <th>制单人</th>
                    <th>备注</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="sp-data">
                <tr th:each="item:${list}">
                    <td th:text="${item.id}"></td>
                    <td th:text="${item.billDate}">2019-03-15</td>
                    <td th:text="${item.billNo}">CG201903121700193</td>
                    <td th:text="${item.locationName}">CG201903121700193</td>
                    <td th:text="${item.total}">华衣</td>
                    <td th:text="${item.userName}">0</td>
                    <td th:text="${item.description}">0</td>
                    <td>
                        <b th:text="${T(com.b2c.entity.erp.enums.ErpStocktakingInvoiceStatusEnum).getName(item.status)}"></b>
                    </td>

                    <td>
                        <a th:href="@{/stocktaking/counted(iid=${item.id})}">盘点详情</a>
                        <a th:if="${item.status == T(com.b2c.entity.erp.enums.ErpStocktakingInvoiceStatusEnum).WaitCounted.index}" th:href="@{/stocktaking/counted(iid=${item.id})}">盘点录入</a>
                        <a class="counted_confirm" th:if="${item.status == T(com.b2c.entity.erp.enums.ErpStocktakingInvoiceStatusEnum).WaitCountedConfirm.index}" th:href="@{/stocktaking/counted(iid=${item.id})}">盘点确认</a>

                    </td>
                </tr>

                </tbody>
            </table>

        </div>
        <div class="pages">
            <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
        </div>
    </div>

    <script type="text/javascript" src="/sb/jquery.min.js"></script>
    <script type="text/javascript" src="/sb/Tips.min.js"></script>



    <!-- end sp-wrapper -->
    <script>
        layui.use(['laydate', 'layer'], function () {
            var laydate = layui.laydate;
            var layer = layui.layer;
            //执行一个laydate实例
            laydate.render({
                elem: '.startDate' //指定元素
            });
            laydate.render({
                elem: '.endDate' //指定元素
            });

        });
    </script>
</div>
</body>
<html>
